# -*- coding: UTF-8 -*-

def main():
    testClass = MyClass(245,"Beijing",20,333.0)
    print("output string : {0:2}".format(testClass.outputStr()))
    print("output number : {0:11}".format(testClass.num))
    print("output name   : {0:2}".format(testClass.name))
    print("output age    : {0:11}".format(testClass.age))
    print("output name   : ", repr(testClass.name).rjust(2))
    print("output number : ", repr(testClass.num).rjust(8))


class MyClass:
    """
    一个简单的类
    """
    # 定义基本属性
    num = 12345
    name = ''
    age = 0
    # 定义私有属性
    __area = 0

    # 定义构造函数
    def __init__(self, num, name, age, area):
        self.num = num
        self.name = name
        self.age = age
        self.__area = area
        return

    def outputStr(self):
        return "hello world"


if __name__ == '__main__':
    main()